﻿namespace Cos.Core.Model.Template
{
    using System.Collections.Generic;

    public class Part : DomainModelBase
    {
        /// <summary>
        /// Gets or sets the part's id.
        /// </summary>
        /// <value>
        /// The part id.
        /// </value>
        public int Id { get; set; }

        /// <summary>
        /// Gets or sets the name of the part.
        /// </summary>
        /// <value>
        /// The name of the part.
        /// </value>
        public string PartName { get; set; }

        public int TemplateId { get; set; }

        /// <summary>
        /// Gets or sets the type of the data.
        /// </summary>
        /// <value>
        /// The type of the data.
        /// </value>
        public int DataTypeId { get; set; }

        /// <summary>
        /// Gets or sets the part order which set the position of the part in it's parent.
        /// </summary>
        /// <value>
        /// The part order.
        /// </value>
        public int PartOrder { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this instance is multi culture.
        /// </summary>
        /// <value>
        /// <c>true</c> if this instance is multi culture; otherwise, <c>false</c>.
        /// </value>
        public bool IsMultiCulture { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this instance is required.
        /// </summary>
        /// <value>
        /// <c>true</c> if this instance is required; otherwise, <c>false</c>.
        /// </value>
        public bool IsRequired { get; set; }

        /// <summary>
        /// Gets or sets the min value. (used for dates and numbers)
        /// </summary>
        /// <value>
        /// The min value.
        /// </value>
        public string MinValue { get; set; }

        /// <summary>
        /// Gets or sets the max value. (used for dates and numbers)
        /// </summary>
        /// <value>
        /// The max value.
        /// </value>
        public string MaxValue { get; set; }

        /// <summary>
        /// Gets or sets the length of the min. (used for strings)
        /// </summary>
        /// <value>
        /// The length of the min.
        /// </value>
        public int? MinLength { get; set; }

        /// <summary>
        /// Gets or sets the length of the max. (used for strings)
        /// </summary>
        /// <value>
        /// The length of the max.
        /// </value>
        public int? MaxLength { get; set; }

        /// <summary>
        /// Gets or sets the custom validator to apply to the part.
        /// </summary>
        /// <value>
        /// The custom validator.
        /// </value>
        public string CustomValidator { get; set; }

        /// <summary>
        /// Gets or sets the width of the thumbnail. (used for images)
        /// </summary>
        /// <value>
        /// The width of the thumbnail.
        /// </value>
        public int? ThumbnailWidth { get; set; }

        /// <summary>
        /// Gets or sets the height of the thumbnail. (used for images)
        /// </summary>
        /// <value>
        /// The height of the thumbnail.
        /// </value>
        public int? ThumbnailHeight { get; set; }

        /// <summary>
        /// Gets or sets the width of the presentation. (used for images)
        /// </summary>
        /// <value>
        /// The width of the presentation.
        /// </value>
        public int? PresentationWidth { get; set; }

        /// <summary>
        /// Gets or sets the height of the presentation. (used for images)
        /// </summary>
        /// <value>
        /// The height of the presentation.
        /// </value>
        public int? PresentationHeight { get; set; }
    }
}